﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="install_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace="SAMPRO.Web.GFC" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>SMDN Web Site Installing</title>
    <!-- Load the Google AJAX API Loader -->
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <!-- Load the Google Friend Connect javascript library. -->
    <script type="text/javascript">
        google.load('friendconnect', '0.8');
    </script>
    <!-- Initialize the Google Friend Connect OpenSocial API. -->
    <script type="text/javascript">
        google.friendconnect.container.setParentUrl('Default.aspx' /* location of rpc_relay.html and canvas.html */);
        google.friendconnect.container.initOpenSocialApi({
            site: '<%=gfcAppConfig.GetGfcSiteId(this.Application)%>',
            onload: function (securityToken) { init() }
        });
        function init() {
            if (!window.timesloaded) {
                window.timesloaded = 1;
                //initAllData();
            }
            else {
                window.timesloaded++;
            }
            if (window.timesloaded > 1) {
                window.top.location.href = "Default.aspx?tab=3";
                //window.location.reload();
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    <table align="left" style="width: 640px; height: 350px">    
        <%-- Top --%>
    <tr>
    <td style=" height: 2px"></td>
    </tr>

    <%-- Body --%>
    <tr><td style="height: 345px; vertical-align: top; text-align: left;">

        <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" BackColor="#EFF3FB" 
            BorderColor="#B5C7DE" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em"
            Height="340px" Width="630px" 
            onactivestepchanged="Wizard1_ActiveStepChanged" 
            onfinishbuttonclick="Wizard1_FinishButtonClick" 
            onnextbuttonclick="Wizard1_NextButtonClick" >
            <HeaderStyle BackColor="#284E98" BorderColor="#EFF3FB" BorderStyle="Solid" 
                BorderWidth="2px" Font-Bold="True" Font-Size="0.9em" ForeColor="White" 
                HorizontalAlign="Center" />
            <NavigationButtonStyle BackColor="White" BorderColor="#507CD1" 
                BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" 
                ForeColor="#284E98"/>
            <SideBarButtonStyle BackColor="#507CD1" Font-Names="Verdana" 
                ForeColor="White" />
            <SideBarStyle BackColor="#507CD1" Font-Size="0.9em" VerticalAlign="Top" Width="180" />
            <StepStyle Font-Size="0.8em" ForeColor="#333333" />
            <WizardSteps>
                <asp:WizardStep ID="WizardStep_inst_pass" runat="server" 
                    Title="Enter install password" StepType="Start">
                    <div style="height: 310px; left: 15px; vertical-align: top; text-align: left; position: relative; top: 0px; width: 419px;">
                        <br />
                        <asp:Label ID="lblPwd1" runat="server" 
                            Text="Enter password for protection install module:"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtPwd" runat="server" TextMode="Password"></asp:TextBox>
                        <br />
                        <asp:Label ID="lblPwd2" runat="server" Text="Confirm:"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtPwdConfirm" runat="server" TextMode="Password"></asp:TextBox>
                        <br />
                        <asp:Label ID="lblPwdIsExist" runat="server" 
                            Text="install password not set/ Enter password before continue"></asp:Label>
                        <br />
                        <asp:Button ID="btnSavePwd" runat="server" OnClick="btnSavePwd_Click" 
                            Text="Save" />
                    </div>
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStepConnStr" runat="server" Title="Connection String" 
                    StepType="Step">
                    <div style="height: 310px; left: 15px; vertical-align: top; text-align: left; position: relative; top: 0px; width: 419px;">
                        <br />
                        <asp:Label ID="lblConnStr" runat="server" Text="Curent connection string ( ConnectionStrings:LocalSqlServer ) :" 
                            Width="100%"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtConnStrCur" runat="server" 
                            Text="<%$ ConnectionStrings:LocalSqlServer %>" 
                            ReadOnly="True" Width="100%"></asp:TextBox>
                        <br />
                        <asp:Panel ID="Panel1" runat="server" Height="80%" Width="100%">
                            New connection string value for (ConnectionStrings:LocalSqlServer) :<br />
                            <asp:TextBox ID="txtConnStrNew" runat="server" Width="100%"></asp:TextBox>
                            <br />
                            <asp:Button ID="btnTestConnStr" runat="server" Text="Test" Width="100px" 
                                OnClick="btnTestConnStr_Click" />
                            &nbsp;
                            <asp:Button ID="btnConnStrSave" runat="server" Text="Save" Width="100px" 
                                Enabled="False" OnClick="btnConnStrSave_Click" />
                            <br />
                            <asp:Label ID="lblTestConnStrMsg" runat="server" Width="100%"></asp:Label>
                            <br />
                            Journal of the implementation of validation of the database:<br />
                            <asp:TextBox ID="txtSqlSrvTestLog" runat="server" Height="60px" ReadOnly="True" 
                                TextMode="MultiLine" Width="100%"></asp:TextBox>
                            <br />
                            You must specify the path to the database aspnetdb.
                            <br />
                            if you do not want to change an existing connection, skip this step wizard.<br /> 
                            Troubleshooting:
                            <br />
                            Q/A -
                            <a href="http://social.msdn.microsoft.com/Forums/ru-RU/aspnetru/thread/fe80ef8b-79e6-4d0d-8d91-164282bb005f/" target="_blank">
                            social.MSDN</a></asp:Panel>
                    </div>
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStepSiteID" runat="server" Title="Site ID">
                    <div style="height: 310px; left: 15px; vertical-align: top; text-align: left; position: relative; top: 0px; width: 419px;">
                        <br />

                        Site ID :
                        <asp:TextBox ID="txtSiteID" runat="server" Width="100%"></asp:TextBox>
                        <br />
                        <br />
                        Extra property:<asp:Panel ID="Panel2" runat="server" BorderColor="#003399" 
                            BorderStyle="Solid" Height="200px" BorderWidth="1px">
                            OAuth Key :<br /><asp:TextBox ID="txtOAuthKey" runat="server" Width="95%"></asp:TextBox>
                            <br />
                            OAuth Secret :<br />
                            <asp:TextBox ID="txtOAuthSecret" runat="server" Width="95%"></asp:TextBox>
                            <br />
                            <br />
                            <asp:Button ID="btnSiteIdSave" runat="server" OnClick="btnSiteIdSave_Click" 
                                Text="Save" Width="95%" />
                            <br />
                            <br />
                            <asp:Label ID="lblSiteIDMsg" runat="server" ForeColor="Red"></asp:Label>
                        </asp:Panel>

                    </div>
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStepSiteAdmin" runat="server" 
                    Title="Site Administrator">
                    <div style="height: 310px; left: 15px; vertical-align: top; text-align: left; position: relative; top: 0px; width: 419px;">
                        <br />
                        <gfc:LoginGadget runat="server" id="gfcLoginGadget" Alignment="left" />
                        <br />
                        <asp:Label ID="lblAdminMsg" runat="server"></asp:Label>
                        <br />
                        <asp:Button ID="btnSiteAdminAddToRole" runat="server" 
                            OnClick="btnSiteAdminAddToRole_Click" Text="Add" Width="95%" />
                    </div>
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStepFinish" runat="server" StepType="Finish" 
                    Title="Finish">
                    <div style="height: 310px; left: 15px; vertical-align: top; text-align: left; position: relative; top: 0px; width: 419px;">
                        <br />
                        <asp:CheckBox ID="cbLockInstModule" runat="server" AutoPostBack="True" 
                            OnCheckedChanged="cbLockInstModule_CheckedChanged" 
                            Text="lock install module (recommended)" />
                        <br />
                        <br />
                        <asp:Label ID="lblLockInstModule" runat="server"></asp:Label>
                        <br />
                        <br />
                        To unlock the installation module see the file &quot;app.config&quot;</div>
                </asp:WizardStep>
            </WizardSteps>
        </asp:Wizard>

    </td></tr>

    <%-- Bottom --%>
    <tr><td style=" height: 2px"></td></tr>
    </table>

    </div>
    </form>
</body>
</html>
